home *** CD-ROM | disk | FTP | other *** search
- var useContextualMenu;
-
- function controlsPrefInit() {
- useContextualMenu = (document.getElementById("rightClickAction").value == 6);
- ctrlShortcutActionChanged();
- ctrlShiftShortcutActionChanged();
- altShortcutActionChanged();
- altShiftShortcutActionChanged();
- ctrlAltShiftShortcutActionChanged();
- }
-
- function rightClickActionChanged() {
- if (document.getElementById("rightClickAction").value == 6) {
- if (!useContextualMenu) {
- useContextualMenu = true;
- // Reset other values to "contextual menu"
- document.getElementById("shiftRightClickAction").value = 6;
- document.getElementById("controlRightClickAction").value = 6;
- document.getElementById("altRightClickAction").value = 6;
- }
- } else {
- if (useContextualMenu) {
- useContextualMenu = false;
- // Reset other values to "do nothing"
- document.getElementById("shiftRightClickAction").value = 0;
- document.getElementById("controlRightClickAction").value = 0;
- document.getElementById("altRightClickAction").value = 0;
- }
- }
- }
-
- function shiftRightClickActionChanged() {
- if (document.getElementById("shiftRightClickAction").value == 6) {
- if (!useContextualMenu) {
- useContextualMenu = true;
- // Reset other values to "contextual menu"
- document.getElementById("rightClickAction").value = 6;
- document.getElementById("controlRightClickAction").value = 6;
- document.getElementById("altRightClickAction").value = 6;
- }
- } else {
- if (useContextualMenu) {
- useContextualMenu = false;
- // Reset other values to "do nothing"
- document.getElementById("rightClickAction").value = 0;
- document.getElementById("controlRightClickAction").value = 0;
- document.getElementById("altRightClickAction").value = 0;
- }
- }
- }
-
- function controlRightClickActionChanged() {
- if (document.getElementById("controlRightClickAction").value == 6) {
- if (!useContextualMenu) {
- useContextualMenu = true;
- // Reset other values to "contextual menu"
- document.getElementById("shiftRightClickAction").value = 6;
- document.getElementById("rightClickAction").value = 6;
- document.getElementById("altRightClickAction").value = 6;
- }
- } else {
- if (useContextualMenu) {
- useContextualMenu = false;
- // Reset other values to "do nothing"
- document.getElementById("shiftRightClickAction").value = 0;
- document.getElementById("rightClickAction").value = 0;
- document.getElementById("altRightClickAction").value = 0;
- }
- }
- }
-
- function altRightClickActionChanged() {
- if (document.getElementById("altRightClickAction").value == 6) {
- if (!useContextualMenu) {
- useContextualMenu = true;
- // Reset other values to "contextual menu"
- document.getElementById("shiftRightClickAction").value = 6;
- document.getElementById("controlRightClickAction").value = 6;
- document.getElementById("rightClickAction").value = 6;
- }
- } else {
- if (useContextualMenu) {
- useContextualMenu = false;
- // Reset other values to "do nothing"
- document.getElementById("shiftRightClickAction").value = 0;
- document.getElementById("controlRightClickAction").value = 0;
- document.getElementById("rightClickAction").value = 0;
- }
- }
- }
-
- function ctrlShortcutActionChanged() {
- var currentValue = document.getElementById("ctrlShortcutAction").value;
- if ((currentValue == 0) || (currentValue == 6)) {
- // Disable corresponding checkbox
- document.getElementById("ctrlShortcutMultikey").disabled = true;
- } else {
- // Enable corresponding checkbox
- document.getElementById("ctrlShortcutMultikey").disabled = false;
- }
- }
-
- function ctrlShiftShortcutActionChanged() {
- var currentValue = document.getElementById("ctrlShiftShortcutAction").value;
- if ((currentValue == 0) || (currentValue == 6)) {
- // Disable corresponding checkbox
- document.getElementById("ctrlShiftShortcutMultikey").disabled = true;
- } else {
- // Enable corresponding checkbox
- document.getElementById("ctrlShiftShortcutMultikey").disabled = false;
- }
- }
-
- function altShortcutActionChanged() {
- var currentValue = document.getElementById("altShortcutAction").value;
- if ((currentValue == 0) || (currentValue == 6)) {
- // Disable corresponding checkbox
- document.getElementById("altShortcutMultikey").disabled = true;
- } else {
- // Enable corresponding checkbox
- document.getElementById("altShortcutMultikey").disabled = false;
- }
- }
-
- function altShiftShortcutActionChanged() {
- var currentValue = document.getElementById("altShiftShortcutAction").value;
- if ((currentValue == 0) || (currentValue == 6)) {
- // Disable corresponding checkbox
- document.getElementById("altShiftShortcutMultikey").disabled = true;
- } else {
- // Enable corresponding checkbox
- document.getElementById("altShiftShortcutMultikey").disabled = false;
- }
- }
-
- function ctrlAltShiftShortcutActionChanged() {
- var currentValue = document.getElementById("ctrlAltShiftShortcutAction").value;
- if ((currentValue == 0) || (currentValue == 6)) {
- // Disable corresponding checkbox
- document.getElementById("ctrlAltShiftShortcutMultikey").disabled = true;
- } else {
- // Enable corresponding checkbox
- document.getElementById("ctrlAltShiftShortcutMultikey").disabled = false;
- }
- }
-
-